/*
 * @Author: LIFM0623 1944099171@qq.com
 * @Date: 2024-01-22 15:23:12
 * @LastEditors: EyeSklear 1814580085@qq.com
 * @LastEditTime: 2024-02-23 14:19:15
 * @FilePath: \Scene_Back\src\email\email.controller.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Controller, Get, Param } from '@nestjs/common';
import { EmailService } from './email.service';
import { Public } from 'src/common/decorator/public.decorator';

@Controller('email')
export class EmailController {
  constructor(private readonly emailService: EmailService) {}
  @Public()
  @Get('sendCode/:email')
  async sendEmailCode(@Param() param: any) {
    const data = {
      email: param.email,
    };
    return this.emailService.sendEmailCode(data);
  }
}
